<?php
require_once ('../lib/config.php');
require_once ('../lib/facebook.php');
require_once ('../lib/friends.php');
//require_once ('../lib/friend.php');
require_once ('../lib/test.php');
require_once ('../../simpletest/autorun.php');
require_once ('../lib/init.php');

class TestQuery_myPost extends UnitTestCase {
    
    function setUp(){
        global $login_button,$facebook;
        
        if(isLoggedIn()){
            try{
                $me = getOneself();
            }catch(Exception $e){
                print($login_button);
                exit();
            }
        }
    }
    
    //refer to http://www.simpletest.org/en/unit_test_documentation.html
    function test_myPost(){ 
    
        $query = "SELECT source_id, app_id FROM stream 
        		WHERE filter_key = 'nf' AND source_id != me() AND actor_id = me() AND created_time > ".QUERY_SINCE." LIMIT 50";
        
        $id1 = '100000525262538'; //Jaesun
        $id2 = '100000416787478'; //Yool
        
        $query = "SELECT message FROM stream 
        		WHERE actor_id = me() AND source_id = '100000525262538' 
        		AND created_time > ".QUERY_SINCE;
            
        $response = callFQL($query);
        
        print_r($response);
        
 
    }
}
?>
